/*
@hehung
email: 1398660197@qq.com
wechat: hehung95
reproduced and please indicate the source @hehung
*/

#ifndef APP_EEPROM_H_
#define APP_EEPROM_H_

#include "hal_data.h"


/* AT24C01/02 page */    
#define EEPROM_PAGESIZE                   8
#define I2C_Register_SR1                ((uint8_t)0x14)

void Eeprom_I2c_Init(void);
void Eeprom_I2C_ByteWrite(unsigned char address, unsigned char byte);
void Eeprom_I2C_Writepage(unsigned char* ptr_write , unsigned char WriteAddr,unsigned char len);
void Eeprom_I2C_BufferWrite(uint8_t* pBuffer, uint8_t WriteAddr,uint16_t NumByteToWrite);
void Eeprom_I2C_BufferRead(unsigned char* ptr_read,unsigned char address,unsigned char byte);
// void Eeprom_I2C_WaitState(void);
void Eeprom_I2C_Writedrase(void);
void Eeprom_ReadKeyData(void);
void Eeprom_UpdateKeyData(void);


#endif /* APP_EEPROM_H_ */